package hostcompetition;

import java.util.Scanner;

public class ScoringSystem {
    Scanner scanner = new Scanner(System.in);
    private final int people = scanner.nextInt();
    private final int[]score = new int[people];
    void scoring(){
        System.out.println("请打分");
        for (int i = 0 ; i < people ; i++){
            score[i] = scanner.nextInt();
        }
    }
    void mathScore() {
        int average = 0;
        int max = score[0];
        for (int i = 0; i < people; i++) {
            if (max < score[i]) {
                max = score[i];
            }
        }
        int min = score[0];
        for (int i = 0; i < people; i++) {
            if (min > score[i]) {
                min = score[i];
            }
        }
        int o = 0;
        double pjf = 0.0;
        for (o = 0 ; o < people; o++) {
            if (o == 0) {
                average = score[o];
            } else if (o == 1) {
                average = average + score[o];
                pjf = (double) average / (o + 1);
            } else if(o >= 2){
                average = average + score[o];
                pjf = (double)(average - min - max) / (o-1);
            }
        }
        System.out.println("平均分是:" + pjf);
    }
}

